Skip to content

Moving OC card method logic to the new OC payment method class #4579

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 24 commits into
base: fix/removing-card-requirement-for-oc
Choose a base branch
from

Conversation

wjrosa
Copy link
Contributor

@wjrosa wjrosa commented Aug 12, 2025

Fixes STRIPE-667

Changes proposed in this Pull Request:

This PR moves all the specific Optimized Checkout logic of the card payment method to a new payment method class. The goal is to improve the code's organization and properly separate its concerns.

Testing instructions

  • Checkout to this branch on your test environment (dev/moving-oc-card-method-logic-to-single-method-class)
  • Connect your Stripe account
  • Enable the Optimized Checkout
  • Enable some payment methods
  • As a shopper, add any product to your cart
  • Go to the block checkout page
  • Confirm the Stripe (single) payment element is displayed and you are able to complete the purchase
  • Confirm the same for the classic checkout
  • Confirm that you can also add payment methods

  • Covered with tests (or have a good reason not to test in description ☝️)
  • Tested on mobile (or does not apply)

Changelog entry

  • This Pull Request does not require a changelog entry. (Comment required below)
Changelog Entry Comment

Comment

Post merge

@wjrosa wjrosa self-assigned this Aug 13, 2025
@wjrosa wjrosa marked this pull request as ready for review August 13, 2025 12:37
@wjrosa wjrosa requested review from a team, malithsen and Mayisha and removed request for a team August 13, 2025 20:35
@wjrosa wjrosa changed the title Moving OC card method logic to the new single method class Moving OC card method logic to the new OC payment method class Aug 13, 2025
Copy link
Contributor

@Mayisha Mayisha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wjrosa I am getting some errors when testing this branch.

Settings
✅ Settings page looks good.

Shortcode checkout
✅ Single payment element is displayed on the checkout page.
Screenshot 2025-08-14 at 5 09 43 PM
🔴 Checkout fails for me with the following error-

Screenshot 2025-08-14 at 5 14 44 PM

And I see this in my logs

Screenshot 2025-08-14 at 4 53 10 PM

Block checkout
⚠️ Single payment element is displayed on the block checkout page. Probably unrelated to this PR but I don't see the test instructions on the block checkout page. But I see them in shortcode.

Screenshot 2025-08-14 at 5 09 19 PM

🔴 Checkout fails with the following error-

Screenshot 2025-08-14 at 4 59 11 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants